configure.ac: Depend on cairo 1.14.0
authorJavier Jardón <jjardon@gnome.org>
Sat, 25 Oct 2014 19:23:16 +0000 (20:23 +0100)
committerJavier Jardón <jjardon@gnome.org>
Mon, 10 Nov 2014 15:12:17 +0000 (15:12 +0000)
This is needed for cairo_set_device_scale()

17 files changed:
config.h.win32.in
configure.ac
gdk/gdkcursor.c
gdk/gdkgl.c
gdk/gdkwindow.c
gdk/wayland/gdkcursor-wayland.c
gdk/wayland/gdkdisplay-wayland.c
gdk/wayland/gdkwindow-wayland.c
gdk/x11/gdkcursor-x11.c
gdk/x11/gdkdisplay-x11.c
gdk/x11/gdkglcontext-x11.c
gdk/x11/gdkscreen-x11.c
gdk/x11/gdkwindow-x11.c
gtk/gtkcssshadowvalue.c
gtk/gtkdnd.c
gtk/gtkiconhelper.c
gtk/inspector/visual.c

index 8674291207149a38c5c1f7e191e60e25a25fe515..1cfb8e93e7d3d5a7f6a37bb041f859fbe009cc41 100644 (file)
@@ -23,9 +23,6 @@
 /* Define to 1 if you have the `bind_textdomain_codeset' function. */
 #define HAVE_BIND_TEXTDOMAIN_CODESET 1
 
-/* Define to 1 if you have the `cairo_surface_set_device_scale' function. */
-/* #undef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE */
-
 /* define if we have colord */
 /* #undef HAVE_COLORD */
 
index 7c78d52ad7ac4ba1d951ab53e099cff1d807bb4a..d8105127d716c5b10b43b583bb43246c0a9db3b6 100644 (file)
@@ -44,7 +44,7 @@ m4_define([gtk_binary_version], [3.0.0])
 m4_define([glib_required_version], [2.43.0])
 m4_define([pango_required_version], [1.36.7])
 m4_define([atk_required_version], [2.15.1])
-m4_define([cairo_required_version], [1.12.0])
+m4_define([cairo_required_version], [1.14.0])
 m4_define([gdk_pixbuf_required_version], [2.30.0])
 m4_define([introspection_required_version], [1.39.0])
 m4_define([wayland_required_version], [1.5.91])
@@ -1342,17 +1342,6 @@ else
         LIBS="$gtk_save_LIBS"
 fi
 
-# Check for cairo_set_device_scale, as we don't want to depend hard on
-# this until there is a stable release with it
-CAIRO_CFLAGS=`$PKG_CONFIG --cflags cairo`
-CAIRO_LIBS=`$PKG_CONFIG --libs cairo`
-CFLAGS="$CFLAGS $CAIRO_CFLAGS"
-gtk_save_LIBS="$LIBS"
-LIBS="$CAIRO_LIBS $LIBS"
-AC_CHECK_FUNCS(cairo_surface_set_device_scale)
-LIBS="$gtk_save_LIBS"
-
-
 CFLAGS="$saved_cflags"
 LDFLAGS="$saved_ldflags"
 
index a9306e07821a0ec57fc12f98aff032df0027ded5..ae8b3a643dad411a273874b87794f1aa2ad4b2fa 100644 (file)
@@ -450,9 +450,7 @@ gdk_cursor_get_image (GdkCursor *cursor)
   h = cairo_image_surface_get_height (surface);
 
   x_scale = y_scale = 1;
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
   cairo_surface_get_device_scale (surface, &x_scale, &y_scale);
-#endif
 
   pixbuf = gdk_pixbuf_get_from_surface (surface, 0, 0, w, h);
   cairo_surface_destroy (surface);
index 152941166f9b7070efe8b0aa3296467f311bd7ad..3465508c578691c4240d19dadf09416f5918f834 100644 (file)
@@ -596,9 +596,7 @@ gdk_cairo_draw_from_gl (cairo_t              *cr,
                                                   (alpha_size == 0) ? CAIRO_FORMAT_RGB24 : CAIRO_FORMAT_ARGB32,
                                                   width, height);
 
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
       cairo_surface_set_device_scale (image, buffer_scale, buffer_scale);
-#endif
 
       framebuffer = paint_data->tmp_framebuffer;
       glBindFramebufferEXT (GL_FRAMEBUFFER_EXT, framebuffer);
@@ -677,9 +675,7 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface,
   window_height = gdk_window_get_height (window);
 
   sx = sy = 1;
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
   cairo_surface_get_device_scale (window->current_paint.surface, &sx, &sy);
-#endif
 
   cairo_surface_get_device_offset (surface,
                                    &device_x_offset, &device_y_offset);
index ca7632a75fb5c0edfea782bdfe153bee699d9aca..7d85b76ef4c09826a9981697b923d1e06aac2f06 100644 (file)
@@ -2945,9 +2945,7 @@ gdk_window_begin_paint_region (GdkWindow       *window,
                                                                          MAX (clip_box.width, 1),
                                                                          MAX (clip_box.height, 1));
       sx = sy = 1;
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
       cairo_surface_get_device_scale (window->current_paint.surface, &sx, &sy);
-#endif
       cairo_surface_set_device_offset (window->current_paint.surface, -clip_box.x*sx, -clip_box.y*sy);
       gdk_cairo_surface_mark_as_direct (window->current_paint.surface, window);
 
@@ -9457,9 +9455,7 @@ gdk_window_create_similar_surface (GdkWindow *     window,
 
   window_surface = gdk_window_ref_impl_surface (window);
   sx = sy = 1;
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
   cairo_surface_get_device_scale (window_surface, &sx, &sy);
-#endif
 
   switch (_gdk_rendering_mode)
   {
@@ -9467,18 +9463,14 @@ gdk_window_create_similar_surface (GdkWindow *     window,
       {
         cairo_rectangle_t rect = { 0, 0, width * sx, height *sy };
         surface = cairo_recording_surface_create (content, &rect);
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
         cairo_surface_set_device_scale (surface, sx, sy);
-#endif
       }
       break;
     case GDK_RENDERING_MODE_IMAGE:
       surface = cairo_image_surface_create (content == CAIRO_CONTENT_COLOR ? CAIRO_FORMAT_RGB24 :
                                             content == CAIRO_CONTENT_ALPHA ? CAIRO_FORMAT_A8 : CAIRO_FORMAT_ARGB32,
                                             width * sx, height * sy);
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
       cairo_surface_set_device_scale (surface, sx, sy);
-#endif
       break;
     case GDK_RENDERING_MODE_SIMILAR:
     default:
@@ -9556,12 +9548,10 @@ gdk_window_create_similar_image_surface (GdkWindow *     window,
       cairo_surface_destroy (window_surface);
     }
 
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
   if (scale == 0)
     scale = gdk_window_get_scale_factor (window);
 
   cairo_surface_set_device_scale (surface, scale, scale);
-#endif
 
   return surface;
 }
index 38a8dbb2d7e82f29df09e3e704337d96c2d13bd5..c350b03c198c2b64e15294abfef5e6fa681790d6 100644 (file)
@@ -308,13 +308,9 @@ _gdk_wayland_display_get_cursor_for_surface (GdkDisplay *display,
 
   if (surface)
     {
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
-       {
-         double sx, sy;
-         cairo_surface_get_device_scale (surface, &sx, &sy);
-         cursor->surface.scale = (int)sx;
-       }
-#endif
+      double sx, sy;
+      cairo_surface_get_device_scale (surface, &sx, &sy);
+      cursor->surface.scale = (int)sx;
       cursor->surface.width = cairo_image_surface_get_width (surface);
       cursor->surface.height = cairo_image_surface_get_height (surface);
     }
index 56e7278ee29567c36cb5806bf30cd2ecba5edae0..2bb1aaddb133695c801c7ea0e2de200413a739b5 100644 (file)
@@ -800,9 +800,7 @@ _gdk_wayland_display_create_shm_surface (GdkWaylandDisplay *display,
   cairo_surface_set_user_data (surface, &gdk_wayland_cairo_key,
                                data, gdk_wayland_cairo_surface_destroy);
 
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
   cairo_surface_set_device_scale (surface, scale, scale);
-#endif
 
   status = cairo_surface_status (surface);
   if (status != CAIRO_STATUS_SUCCESS)
index a7e23b52d8333889eb17ac6d72fcc7c689f530fa..e44125ad35b9802d6a29467232156404d70264ef 100644 (file)
@@ -217,9 +217,7 @@ _gdk_wayland_screen_create_root_window (GdkScreen *screen,
                                       impl->scale,
                                       impl->scale);
 
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
   cairo_surface_set_device_scale (impl->cairo_surface, impl->scale, impl->scale);
-#endif
 
   window->window_type = GDK_WINDOW_ROOT;
   window->depth = 32;
@@ -420,11 +418,6 @@ window_update_scale (GdkWindow *window)
       scale = MAX (scale, output_scale);
     }
 
-#ifndef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
-  /* Don't announce a scale if we can't support it */
-  scale = 1;
-#endif
-
   if (scale != impl->scale)
     {
       impl->scale = scale;
index 43ae9fc695ab140942cadebda960bf8aa4a3eba1..7ed4681064f440de0916409b84ecbe357174e0fb 100644 (file)
@@ -524,9 +524,7 @@ get_surface_size (cairo_surface_t *surface,
 
   x_scale = y_scale = 1;
 
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
   cairo_surface_get_device_scale (surface, &x_scale, &y_scale);
-#endif
 
   /* Assume any set scaling is icon scale */
   *width =
@@ -562,9 +560,7 @@ create_cursor_image (cairo_surface_t *source_surface,
                                                  height,
                                                  width * 4);
 
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
   cairo_surface_set_device_scale (surface, scale, scale);
-#endif
 
   cr = cairo_create (surface);
   cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
index 4799bc6b5acc2603c9a3d34f8161f103ed41f3d0..2ebbed9953ebb1883e8ade48ab9c6ad89edba4de 100644 (file)
@@ -2707,11 +2707,6 @@ gdk_x11_display_set_window_scale (GdkDisplay *display,
 
   scale = MAX (scale, 1);
 
-#ifndef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
-  /* Without cairo support we can't support any scale but 1 */
-  scale = 1;
-#endif
-
   x11_screen = GDK_X11_SCREEN (GDK_X11_DISPLAY (display)->screen);
 
   if (!x11_screen->fixed_window_scale)
index b545f28c7d7e6a0fe91e155e660c5423d80c113e..847a2adb6f34798977dc2a19a546067b48f920b4 100644 (file)
@@ -469,9 +469,7 @@ gdk_x11_gl_context_texture_from_surface (GdkGLContext *paint_context,
   window_height = gdk_window_get_height (window);
 
   sx = sy = 1;
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
   cairo_surface_get_device_scale (window->current_paint.surface, &sx, &sy);
-#endif
 
   cairo_surface_get_device_offset (surface,
                                   &device_x_offset, &device_y_offset);
index e7002130059530503e918b056e3954b33b305ea9..5c71c538a7791e43bd16c1682a6205309c27398d 100644 (file)
@@ -1128,11 +1128,7 @@ _gdk_x11_screen_new (GdkDisplay *display,
   /* we want this to be always non-null */
   x11_screen->window_manager_name = g_strdup ("unknown");
 
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
   scale_str = g_getenv ("GDK_SCALE");
-#else
-  scale_str = "1";
-#endif
   if (scale_str)
     {
       x11_screen->fixed_window_scale = TRUE;
index c2d7cf7387819435140aa85977861de138ecedda..ec4eead3621158210271953da9075523e79d0a21 100644 (file)
@@ -467,9 +467,7 @@ gdk_x11_ref_cairo_surface (GdkWindow *window)
       impl->cairo_surface = gdk_x11_create_cairo_surface (impl,
                                                           gdk_window_get_width (window) * impl->window_scale,
                                                           gdk_window_get_height (window) * impl->window_scale);
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
       cairo_surface_set_device_scale (impl->cairo_surface, impl->window_scale, impl->window_scale);
-#endif
 
       if (WINDOW_IS_TOPLEVEL (window) && impl->toplevel->in_frame)
         hook_surface_changed (window);
@@ -2961,9 +2959,7 @@ gdk_window_x11_set_background (GdkWindow      *window,
 
           cairo_surface_get_device_offset (surface, &x, &y);
           sx = sy = 1.;
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
           cairo_surface_get_device_scale (surface, &sx, &sy);
-#endif
           /* XXX: This still bombs for non-pixmaps, but there's no way to
            * detect we're not a pixmap in Cairo... */
           if (x == 0.0 && y == 0.0 &&
index 8b5ea9f3d16bf07010136a174ce90ea7524d248b..d3847ba627675f5f8d3de221969e4aee51d339c7 100644 (file)
@@ -431,9 +431,7 @@ make_blurred_pango_surface (cairo_t           *existing_cr,
   pango_layout_get_pixel_extents (layout, &ink_rect, NULL);
   clip_radius = _gtk_cairo_blur_compute_pixels (radius);
   x_scale = y_scale = 1;
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
-      cairo_surface_get_device_scale (cairo_get_target (existing_cr), &x_scale, &y_scale);
-#endif
+  cairo_surface_get_device_scale (cairo_get_target (existing_cr), &x_scale, &y_scale);
 
   surface = cairo_surface_create_similar_image (cairo_get_target (existing_cr),
                                                 CAIRO_FORMAT_A8,
index 50914e276e656a6d9da822e54c09705b88a3822b..3f16f9417fc6f24c84b9a974beddce414caa5c22 100644 (file)
@@ -844,9 +844,7 @@ get_surface_size (cairo_surface_t *surface,
 
   x_scale = y_scale = 1;
 
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
   cairo_surface_get_device_scale (surface, &x_scale, &y_scale);
-#endif
 
   /* Assume any set scaling is icon scale */
   *width =
index 2fc97d106c5ef10eeecd2b7c6b856cac86d33d31..741b426da85e8fd893c3fa54a5d24ad6274d850d 100644 (file)
@@ -335,9 +335,7 @@ get_surface_size (GtkIconHelper   *self,
     {
       x_scale = y_scale = 1;
 
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
       cairo_surface_get_device_scale (surface, &x_scale, &y_scale);
-#endif
 
       /* Assume any set scaling is icon scale */
       *width =
index 1a74ad08e02e41cd8b80383d3ac49fd829349568..8c10ff5aa7e3edb627700f1e5c1804031e9ac2ee 100644 (file)
@@ -363,7 +363,7 @@ init_font (GtkInspectorVisual *vis)
                           G_BINDING_BIDIRECTIONAL|G_BINDING_SYNC_CREATE);
 }
 
-#if defined (GDK_WINDOWING_X11) && defined (HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE)
+#if defined (GDK_WINDOWING_X11)
 static void
 scale_changed (GtkAdjustment *adjustment, GtkInspectorVisual *vis)
 {
@@ -379,7 +379,7 @@ scale_changed (GtkAdjustment *adjustment, GtkInspectorVisual *vis)
 static void
 init_scale (GtkInspectorVisual *vis)
 {
-#if defined (GDK_WINDOWING_X11) && defined (HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE)
+#if defined (GDK_WINDOWING_X11)
   GdkScreen *screen;
 
   screen = gdk_screen_get_default ();